package easycloud.ecs.provider.snda.model;

import java.util.ArrayList;
import java.util.List;

import com.snda.storage.service.model.CSObject;

import easycloud.ecs.api.model.IStorageObjectListing;
import easycloud.ecs.api.model.IStorageObjectSummary;

public class SndaStorageObjectListing implements IStorageObjectListing {

	private CSObject[] objectList;

	public SndaStorageObjectListing(CSObject[] objectList) {
		this.objectList = objectList;
	}

	@Override
	public List<IStorageObjectSummary> getObjectSummaries() {
		List<IStorageObjectSummary> result = new ArrayList<IStorageObjectSummary>();
		for (CSObject summary : objectList) {
			result.add(new SndaStorageObjectSummary(summary));
		}
		return result;
	}

}
